#ifndef __ALGO_ASR_MFCC_H__
#define __ALGO_ASR_MFCC_H__

#define FRAMECOUNT          256
#define FILTERNUM           24

// Cepstrum 
//#define    FE_CEP_ORDER           12 /* Number of cepstral coefficients is CEPORDER+1 including c0 */ 
#define    FE_CEP_ORDER           23 /* Number of cepstral coefficients is CEPORDER+1 including c0 */ 
 
// Dynamic features 
#define FE_DELTA                5 /* Order of delta coefficients */ 
#define FE_DDELTA               3 /* Order of acceleration (delta-delta) coefficients */ 
 
// Filter bank 
#define FE_NUM_CHANNELS        23 /* Number of bands in filter bank */ 
#define FE_FBANK_FLOOR    (-50.0) /* Energy floor for filter bank coefficients */ 
#define FE_MIN_ENERGY (1) 
#define FE_MIN_LOG_ENERGY (0) 
#define    M_PI        3.14159265358979323846 
#define NR_NUM_CHANNELS             23 
#define NR_FL                       17 
 
 
int preemphasize(float *sample, int sampleN); 
//int preprocessing(float *sample, int sampleN); 
int Do_hamm_window(float *inputA, int inputN); 
int mel_cepstrum_basic(float *sample, int frameSize, float *mel_cep, int ceporder, int fft_size); 
int MfccInitDCTMatrix (float *dctMatrix, int ceporder, int numChannels); 
int _mel_cepstrum_basic(float *sample, int frameSize, float *mel_cep, int fborder, int ceporder, int fft_size); 
void MfccInitMelFilterBanks (void); 
float LogE(float x); 
void PRFFT_NEW(float *a, float *b, int m, int n_pts, int iff); 
void MfccMelFilterBank (float *sigFFT, int numChannels, float* output, int normalize); 
int    _filterbank_basic(float *sample, int frameSize, float *filtbank, int fborder, int fftSize, int cep_smooth, int cepFilterLen); 
void MfccDCT (float *x, int ceporder, int numChannels, float *mel_cep); 
void MfccPostProcess(float *mel_cep);
extern const float matrixmel[24][129];

typedef struct _JComplex{
    float real;
    float image;
}JComplex;

#endif //__ALGO_ASR_MFCC_H__
